import { createBrowserRouter } from 'react-router-dom';
import Layout from '@/layout/Layout';
import Home from '@/views/Home/Home';
import Hospital from '@/views/Hospital/Hospital/Hospital';
import Register from 'src/views/Hospital/Register/Register';
import Detail from '@/views/Hospital/Detail/Detail';
import Notice from '@/views/Hospital/Notice/Notice';
import Suspend from '@/views/Hospital/Suspend/Suspend';
import Query from '@/views/Hospital/Query/Query';
import Schedule from '@/views/Hospital/Schedule/Schedule';
import Booking from '@/views/Hospital/Booking/Booking';
import Member from '@/views/Member/Member/Member';
import User from '@/views/Member/User/User';
import OrderList from '@/views/Member/OrderList/OrderList';
import Patinet from '@/views/Member/Patient/Patinet';
import Account from '@/views/Member/Account/Account';
import Opinion from '@/views/Member/Opinion/Opinion';
import OrderDetail from '@/views/Member/OrderDetail/OrderDetail';
import PatientForm from '@/views/Member/PatientForm/PatientForm';

const routes = createBrowserRouter([
  {
    path: '/',
    element: <Layout></Layout>,
    children: [
      {
        index: true,
        element: <Home></Home>,
      },
      {
        path: '/hospital',
        element: <Hospital></Hospital>,
        children: [
          {
            path: '/hospital/registration/:hoscode',
            element: <Register></Register>,
          },
          {
            path: '/hospital/schedule/:hoscode/:depcode',
            element: <Schedule></Schedule>,
          },
          {
            path: '/hospital/booking/:hoscode/:scheduleId',
            element: <Booking></Booking>,
          },
          {
            path: '/hospital/detail/:hoscode',
            element: <Detail></Detail>,
          },
          {
            path: '/hospital/notice/:hoscode',
            element: <Notice></Notice>,
          },
          {
            path: '/hospital/suspend/:hoscode',
            element: <Suspend></Suspend>,
          },
          {
            path: '/hospital/query/:hoscode',
            element: <Query></Query>,
          },
        ],
      },

      {
        path: '/member',
        element: <Member></Member>,
        children: [
          {
            path: '/member/user',
            element: <User></User>,
          },
          {
            path: '/member/orderList',
            element: <OrderList></OrderList>,
          },
          {
            path: '/member/orderDetail/:orderId',
            element: <OrderDetail></OrderDetail>,
          },
          {
            path: '/member/patient',
            element: <Patinet></Patinet>,
          },
          {
            path: '/member/patientForm',
            element: <PatientForm></PatientForm>,
          },
          {
            path: '/member/account',
            element: <Account></Account>,
          },
          {
            path: '/member/opinion',
            element: <Opinion></Opinion>,
          },
        ],
      },


    ],
  },
]);

export default routes;
